<%@ page language="java" import="java.util.*;import java.text.SimpleDateFormat;import java.util.Date;" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Date date = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数据字典</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/header.css"/>

<script type="text/javascript" src="<%=basePath%>js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/table.js"></script>
</head>
<body>
<div id="all">
  <div id="banner">
    <h1>数据字典查询管理系统</h1>
  </div>
  <div id="nav">
    <ul>
      <li class="inactive"><a href="/ODSManager/Function_UserManage">用户管理</a></li>
      <li class="inactive"><a href="#">接口查询</a></li>
      <li class="inactive"><a href="#">表关系查询</a></li>
      <li class="inactive"><a href="/ODSManager/Function_Load_data">数据导入</a></li>
      <li class="inactive" id="inactive_now"><a href="/ODSManager/Function_ODSsearch">ODS表查询</a></li>
      <li class="inactive"><a href="/ODSManager/Function_DataIndex">数据索引</a></li>
      <li class="inactive"><a href="#">新建分类</a></li>
     </ul>
  </div>
  <div id="main">
     <div id="welcome">欢迎你回来,${cname}!&nbsp;&nbsp;&nbsp;现在时间: <jsp:expression>df.format(date) </jsp:expression></div>
    <div id="adminop">
      <ul>
        <li><a href="/ODSManager/user_logout">退出管理</a></li>
        <li><a href="index.html">站点首页</a></li>
      </ul>
    </div>
  </div>
</div>
<div id="body">
  <div class="tablename"> <span>ODS表字段</span>
    <input type="button" value="添加字段" class="add_ziduan"/>
  </div>
  <div class="table">
    <table id="ibody" width="99%" border="0" align="left" cellPadding=3 cellSpacing=1 bgColor="#6298e1">
      <tr align="center">
      	<th><nobr> 字段ID</nobr></th>
        <th><nobr> ODS表名</nobr></th>
        <th><nobr> 字段名</nobr></th>
        <th><nobr> 类型</nobr></th>
        <th><nobr> 接口编号</nobr></th>
        <th><nobr> 说明</nobr></th>
        <th><nobr> 维度值说明</nobr></th>
        <th><nobr> 备注</nobr></th>
        <th><nobr> 主接口列数</nobr></th>
        <th><nobr> 列序号</nobr></th>
        <th width="70"><nobr> 操作</nobr> </th>
      </tr>
      <form action="/ODSManager/SaveChange_Search" method="post" >
      <tr id="add" style="display: none;" >
        <td><input type="text" name="field_id" value="" readonly="readonly" size="3" /></td>
		<td><input type="text" name="ods_table_name" value="" readonly="readonly" size="23"/></td>
		<td><input type="text" name="ods_field_name" value="" size="10" /></td>
		<td><input type="text" name="ods_field_datatype" value="" size="10" /></td>
		<td><input type="text" name="ods_interface_id" value="" readonly="readonly" size="10"/></td>
		<td><input type="text" name="ods_field_specification" value="" size="10" /></td>
		<td><input type="text" name="ods_field_dimen" value="" size="20"/></td>
		<td><input type="text" name="ods_field_moreinfo" value="" size="15"/></td>
		<td><input type="text" name="ods_field_main_file_column_number" value="" size="5"/></td>
		<td><input type="text" name="ods_field_column_number" value="" size="5"/></td>
		<td><nobr><input type="submit" name="allinfo" id="button" value="保存" />
        <input  id="add_no" type="button" name="button2" id="button2" value="取消"/></nobr></td>      
      </tr>
    </form>
      <!-- 定义标签变量获取页面信息 -->
    <s:set name="pagenow" value="#session.AllODSField.pageNow"></s:set>
    <s:set name="pagecount" value="#session.AllODSField.pageCount"></s:set>
    <s:set name="rowcount" value="#session.AllODSField.rowCount"></s:set>
    
	<s:set name="first" value="((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+1)"></s:set>
	<s:set name="end" value="(#session.AllODSField.pageSize*#session.AllODSField.pageNow)"></s:set>
	<s:if test="#end>#rowcount">
	<s:set name="end" value="#rowcount" ></s:set>
	</s:if>

    <s:iterator begin="#first" end="#end" status="indexNo">
    <tr> 
    <td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].fieldId)"/></td>
    <td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsTableName)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldName)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldDatatype)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsInterfaceId)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldSpecification)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldDimen)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldMoreinfo)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldMainFileColumnNumber)"/></td>
	<td><s:property value="(#session.AllODSField.list2[((#session.AllODSField.pageNow-1)*#session.AllODSField.pageSize+#indexNo.getIndex())].odsFieldColumnNumber)"/></td>
    <td><a href="#" class="add_ziduan"/>修改</a>-<a href="#">删除</a></td>
    </s:iterator>
    </table>
   
  </div>
  </br>
   <s:if test="#pagenow>1"><a href="/ODSManager/ChoosePage_Search?PageNow=<s:property value='(#pagenow-1)'/>">上一页</a>&nbsp;&nbsp;</s:if>
    <s:iterator begin="1" end="#session.AllODSField.pageCount" status="PageNo">
   	<a href="/ODSManager/ChoosePage_Search?PageNow=<s:property value='(#PageNo.getIndex()+1)'/>"><<s:property value='(#PageNo.getIndex()+1)'/>></a>&nbsp;&nbsp;
    </s:iterator>
    <s:if test="#pagenow<#pagecount"><a href="/ODSManager/ChoosePage_Search?PageNow=<s:property value='(#pagenow+1)'/>">下一页</a></s:if>
</div>
</body>
</html>
